package util.file;

import java.util.HashMap;
import java.util.Map;


public class FileTypeHelper {
	
	private static final Map<String, String> fileTypeMap = new HashMap<>();
	
	static {
		fileTypeMap.put("image/jpeg", "jpg");
		fileTypeMap.put("image/gif", "gif");
		fileTypeMap.put("image/png", "png");
		fileTypeMap.put("image/svg+xml", "svg");
	}

	public static String translateTypeToExt(String type) {
		return fileTypeMap.get(type);
	}

}
